<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexIdxProjectModuleEpisodeShowingsNumberInEntityTable extends AbstractMigration
{
    public function up()
    {
        $this->table('entity')
            ->addIndex(['project_id', 'module_id', 'initial_episode_code', 'showings_number'], ['type' => 'normal', 'name' => 'idx_project_module_episode_show_number'])
            ->save();

    }

    public function down()
    {
        $this->table('entity')->removeIndexByName('idx_project_module_episode_show_number')->save();
    }
}
